package com.atguigu.spzx.manager.mapper;

import com.atguigu.spzx.model.dto.system.AssginMenuDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassName: SysRoleMenuMapper
 * Package: com.atguigu.spzx.manager.mapper
 * Description:
 *
 * @Author 刘强
 * @Create 2024/7/3 16:36
 * @Version 1.0
 */
@Mapper
public interface SysRoleMenuMapper {
    /**
     * 根据角色id查询该角色拥有的菜单的id集合
     * @param roleId
     * @return
     */
    List<Long> findMenuIdsByRoleId(Long roleId);

    /**
     * 删除指定角色原来的菜单
     * @param roleId
     */
    void deleteByRoleId(Long roleId);

    /**
     * 添加角色菜单关系
     * @param assginMenuDto
     */
    void addBath(@Param("assignMenuDto") AssginMenuDto assginMenuDto);
}
